<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <script src="https://cdn.bootcss.com/hls.js/8.0.0-beta.3/hls.min.js"></script>
  <script src="https://cdn.bootcss.com/dplayer/1.25.0/DPlayer.min.js"></script>
  <link href="https://cdn.bootcss.com/dplayer/1.25.0/DPlayer.min.css" rel="stylesheet">
  <title>dplayer</title>
</head>
<body>
<div id="dplayer" style="margin: 0 auto; width: 960px; height: 540px;"></div>
<script>
  var dp = new DPlayer({
    container: document.getElementById('dplayer'),
    autoplay: true,
    video: {
      type: 'hls',
      url: '${m3u8}',
      pic: '${cover}'
    }
  });
</script>
</body>
</html>